{% extends 'base.html' %}
{% load static cmstags %}
{% load_settings as settings %}
{% block css %}
    <link rel="stylesheet" href="{% static 'css/category.css' %}"/>
{% endblock %}
{% block js %}{% endblock %}
{% block seo %}
    <title>{{ tag.name }}_第{{ page }}页 - {{ settings.site_title }}</title>
    <meta name="keywords" content="{{ tag.name }}"/>
    <meta name="description" content="包含标签'{{ tag.name }}'的内容"/>
{% endblock %}

{% block main %}
    {% get_tag tag.name page 10 as data %}
    <div class="block">
        <div class="title">
        包含<strong>{{ tag }}</strong>的结果，总共{{ data.count }}条。
            </div>
    </div>
    <div class="all-category clearfix">
        {% get_tag_random 10 as tags %}
        {% for t in tags %}
            <a href="{% url 'tag' t.name %}">{{ t.name }}</a>
        {% endfor %}
    </div>
    {% for item in data.list %}
        <div class="article-item clearfix">
            <div class="cover">
                <a href="{% url 'article' item.category__alias item.id %}" target="_blank">
                    <img src="{{ item.cover }}"
                         alt="{{ item.title }}">
                </a>
            </div>
            <div class="content">
                <div class="title">
                    <h5>
                        <a href="{% url 'article' item.category__alias item.id %}"
                           target="_blank">{{ item.title }}</a>
                    </h5>
                </div>
                <div class="summary">{{ item.summary }}</div>
                <div class="info">

                    <span class="iconfont icon-book"></span>
                    <span><a href="{% url 'category' item.category__alias %}"
                             target="_blank">{{ item.category__name }}</a></span>

                    <span class="iconfont icon-date"></span>
                    <span>{{ item.create_date }}</span>

                    <span class="iconfont icon-yanjing"></span>
                    <span>{{ item.hits }}</span>
                </div>
            </div>
        </div>
    {% endfor %}
    {% get_paginator data.num_pages page 8 data.url %}
{% endblock %}